How do I set selected in a multi-list for more than one element. If i use set(DBE multi-list, int i) for more than one element, only the last element is selected. How can I select more than one element in a multi-list (with DLX!)?
(I want to pre select some elements in a multi-list) thsturm - Tue May 09 03:38:24 EDT 2017 |
Re: How to set 'selected' in a multi-list DBE In this case you want to use:
void set(DBE list, int index, bool selected)
|
Re: How to set 'selected' in a multi-list DBE O.Wilkop - Tue May 09 04:23:13 EDT 2017 In this case you want to use:
void set(DBE list, int index, bool selected)
Sets the status of a selected item within a list or list view. identified by index in a list or list view. Valid items are ranged
If this function is used with an incorrect type DBE , a DXL run-time error occurs.
Sorry, it works only for a list or listView but not for a multi-list. I have tried it: DOORS crashed :-( |
Re: How to set 'selected' in a multi-list DBE thsturm - Tue May 09 05:03:44 EDT 2017
Sets the status of a selected item within a list or list view. identified by index in a list or list view. Valid items are ranged
If this function is used with an incorrect type DBE , a DXL run-time error occurs.
Sorry, it works only for a list or listView but not for a multi-list. I have tried it: DOORS crashed :-(
DB main = centered("DB");
string szEntries[] = {"entry1", "entry2", "entry3", "entry4"}
DBE dbeMultiList = multiList(main, "List", 10, szEntries);
realize(main);
set(dbeMultiList, 0, true);
set(dbeMultiList, 1, true);
show(main);
Works for me as expected without a crash, maybe something else in your code is crashing DOORS or you are using a older version? |
Re: How to set 'selected' in a multi-list DBE O.Wilkop - Tue May 09 05:20:41 EDT 2017
DB main = centered("DB");
string szEntries[] = {"entry1", "entry2", "entry3", "entry4"}
DBE dbeMultiList = multiList(main, "List", 10, szEntries);
realize(main);
set(dbeMultiList, 0, true);
set(dbeMultiList, 1, true);
show(main);
Works for me as expected without a crash, maybe something else in your code is crashing DOORS or you are using a older version? Doubble sorry, I forgot the realize(DB). Now it works as intended.
Thanks. |